Skip to content

chore: bump PyTorch version in dependencies & CI #21043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Aug 13, 2025
Merged

chore: bump PyTorch version in dependencies & CI #21043

merged 15 commits into from
Aug 13, 2025

Conversation

Borda
Copy link
Member

@Borda Borda commented Aug 8, 2025

What does this PR do?

Following Torch release of 2.8 - https://github.com/pytorch/pytorch/releases/tag/v2.8.0

Before submitting
  • Was this discussed/agreed via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

Reviewer checklist
  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

📚 Documentation preview 📚: https://pytorch-lightning--21043.org.readthedocs.build/en/21043/

@github-actions github-actions bot added ci Continuous Integration fabric lightning.fabric.Fabric pl Generic label for PyTorch Lightning package dependencies Pull requests that update a dependency file labels Aug 8, 2025
Copy link
Contributor

github-actions bot commented Aug 8, 2025

⚡ Required checks status: All passing 🟢

Groups summary

🟢 pytorch_lightning: Tests workflow
Check ID Status
pl-cpu-guardian success

These checks are required after the changes to .github/workflows/ci-tests-pytorch.yml, requirements/fabric/examples.txt, src/lightning/fabric/utilities/imports.py, src/lightning/fabric/utilities/spike.py, src/lightning/fabric/utilities/testing/_runif.py, requirements/pytorch/base.txt, requirements/pytorch/examples.txt, src/lightning/pytorch/trainer/connectors/logger_connector/result.py, src/lightning/pytorch/utilities/imports.py, src/lightning/pytorch/utilities/testing/_runif.py, tests/tests_pytorch/callbacks/test_spike.py, tests/tests_pytorch/helpers/runif.py, tests/tests_pytorch/loops/test_prediction_loop.py, tests/tests_pytorch/models/test_amp.py, tests/tests_pytorch/serve/test_servable_module_validator.py, tests/tests_pytorch/strategies/launchers/test_multiprocessing.py, tests/tests_pytorch/trainer/connectors/test_data_connector.py, tests/tests_pytorch/trainer/logging_/test_train_loop_logging.py, tests/tests_pytorch/trainer/test_trainer.py.

🟢 pytorch_lightning: Azure GPU
Check ID Status
pytorch-lightning (GPUs) (testing Lightning | latest) success
pytorch-lightning (GPUs) (testing PyTorch | latest) success

These checks are required after the changes to .azure/gpu-tests-pytorch.yml, requirements/pytorch/base.txt, requirements/pytorch/examples.txt, src/lightning/pytorch/trainer/connectors/logger_connector/result.py, src/lightning/pytorch/utilities/imports.py, src/lightning/pytorch/utilities/testing/_runif.py, tests/tests_pytorch/callbacks/test_spike.py, tests/tests_pytorch/helpers/runif.py, tests/tests_pytorch/loops/test_prediction_loop.py, tests/tests_pytorch/models/test_amp.py, tests/tests_pytorch/serve/test_servable_module_validator.py, tests/tests_pytorch/strategies/launchers/test_multiprocessing.py, tests/tests_pytorch/trainer/connectors/test_data_connector.py, tests/tests_pytorch/trainer/logging_/test_train_loop_logging.py, tests/tests_pytorch/trainer/test_trainer.py, requirements/fabric/examples.txt, src/lightning/fabric/utilities/imports.py, src/lightning/fabric/utilities/spike.py, src/lightning/fabric/utilities/testing/_runif.py.

🟢 pytorch_lightning: Benchmarks
Check ID Status
lightning.Benchmarks success

These checks are required after the changes to requirements/fabric/examples.txt, requirements/pytorch/base.txt, requirements/pytorch/examples.txt, src/lightning/fabric/utilities/imports.py, src/lightning/fabric/utilities/spike.py, src/lightning/fabric/utilities/testing/_runif.py, src/lightning/pytorch/trainer/connectors/logger_connector/result.py, src/lightning/pytorch/utilities/imports.py, src/lightning/pytorch/utilities/testing/_runif.py.

🟢 fabric: Docs
Check ID Status
docs-make (fabric, doctest) success
docs-make (fabric, html) success

These checks are required after the changes to src/lightning/fabric/utilities/imports.py, src/lightning/fabric/utilities/spike.py, src/lightning/fabric/utilities/testing/_runif.py, requirements/fabric/examples.txt.

🟢 pytorch_lightning: Docs
Check ID Status
docs-make (pytorch, doctest) success
docs-make (pytorch, html) success

These checks are required after the changes to src/lightning/pytorch/trainer/connectors/logger_connector/result.py, src/lightning/pytorch/utilities/imports.py, src/lightning/pytorch/utilities/testing/_runif.py, requirements/pytorch/base.txt, requirements/pytorch/examples.txt.

🟢 pytorch_lightning: Docker
Check ID Status
build-cuda (3.10, 2.1.2, 12.1.1) success
build-cuda (3.11, 2.2.2, 12.1.1) success
build-cuda (3.11, 2.3.1, 12.1.1) success
build-cuda (3.11, 2.4.1, 12.1.1) success
build-cuda (3.12, 2.5.1, 12.1.1) success
build-cuda (3.12, 2.6.0, 12.4.1) success
build-pl (3.10, 2.1, 12.1.1) success
build-pl (3.11, 2.2, 12.1.1) success
build-pl (3.11, 2.3, 12.1.1) success
build-pl (3.11, 2.4, 12.1.1) success
build-pl (3.12, 2.5, 12.1.1) success
build-pl (3.12, 2.6, 12.4.1) success
build-pl (3.12, 2.7, 12.6.3) success
build-pl (3.12, 2.8, 12.6.3, true) success

These checks are required after the changes to requirements/pytorch/base.txt, requirements/pytorch/examples.txt, requirements/fabric/examples.txt.

🟢 lightning_fabric: CPU workflow
Check ID Status
fabric-cpu-guardian success

These checks are required after the changes to requirements/fabric/examples.txt, src/lightning/fabric/utilities/imports.py, src/lightning/fabric/utilities/spike.py, src/lightning/fabric/utilities/testing/_runif.py, tests/tests_fabric/plugins/precision/test_amp_integration.py, tests/tests_fabric/strategies/launchers/test_multiprocessing_integration.py, tests/tests_fabric/strategies/test_ddp_integration.py, tests/tests_fabric/utilities/test_distributed.py, tests/tests_fabric/utilities/test_spike.py, .github/workflows/ci-tests-fabric.yml.

🟢 lightning_fabric: Azure GPU
Check ID Status
lightning-fabric (GPUs) (testing Fabric | latest) success
lightning-fabric (GPUs) (testing Lightning | latest) success

These checks are required after the changes to .azure/gpu-tests-fabric.yml, requirements/fabric/examples.txt, src/lightning/fabric/utilities/imports.py, src/lightning/fabric/utilities/spike.py, src/lightning/fabric/utilities/testing/_runif.py, tests/tests_fabric/plugins/precision/test_amp_integration.py, tests/tests_fabric/strategies/launchers/test_multiprocessing_integration.py, tests/tests_fabric/strategies/test_ddp_integration.py, tests/tests_fabric/utilities/test_distributed.py, tests/tests_fabric/utilities/test_spike.py.

🟢 mypy
Check ID Status
mypy success

These checks are required after the changes to requirements/fabric/examples.txt, requirements/pytorch/base.txt, requirements/pytorch/examples.txt, src/lightning/fabric/utilities/imports.py, src/lightning/fabric/utilities/spike.py, src/lightning/fabric/utilities/testing/_runif.py, src/lightning/pytorch/trainer/connectors/logger_connector/result.py, src/lightning/pytorch/utilities/imports.py, src/lightning/pytorch/utilities/testing/_runif.py.

🟢 install
Check ID Status
install-pkg-guardian success

These checks are required after the changes to src/lightning/fabric/utilities/imports.py, src/lightning/fabric/utilities/spike.py, src/lightning/fabric/utilities/testing/_runif.py, src/lightning/pytorch/trainer/connectors/logger_connector/result.py, src/lightning/pytorch/utilities/imports.py, src/lightning/pytorch/utilities/testing/_runif.py, requirements/fabric/examples.txt, requirements/pytorch/base.txt, requirements/pytorch/examples.txt.


Thank you for your contribution! 💜

Note
This comment is automatically generated and updates for 60 minutes every 180 seconds. If you have any other questions, contact carmocca for help.

Copy link

codecov bot commented Aug 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87%. Comparing base (577c04d) to head (8f93807).
⚠️ Report is 5 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #21043   +/-   ##
=======================================
  Coverage      87%      87%           
=======================================
  Files         268      268           
  Lines       23341    23343    +2     
=======================================
+ Hits        20330    20332    +2     
  Misses       3011     3011           

@Borda
Copy link
Member Author

Borda commented Aug 8, 2025

memory discrepancy:

_______________ test_multiple_trainer_constant_memory_allocated ________________

tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/test_multiple_trainer_constant0')

    @RunIf(min_cuda_gpus=1)
    def test_multiple_trainer_constant_memory_allocated(tmp_path):

		...
    
>       assert current_memory() <= initial
E       assert 1024 <= 512
E        +  where 1024 = <function test_multiple_trainer_constant_memory_allocated.<locals>.current_memory at 0x7f41601df100>()

Borda and others added 4 commits August 11, 2025 12:50
…>=0.16.0,<0.24.0 in /requirements (#21047)

build(deps): update torchvision requirement in /requirements

Updates the requirements on [torchvision](https://github.com/pytorch/vision) to permit the latest version.
- [Release notes](https://github.com/pytorch/vision/releases)
- [Commits](pytorch/vision@v0.16.0...0.23.0)

---
updated-dependencies:
- dependency-name: torchvision
  dependency-version: 0.23.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@t-vi
Copy link
Contributor

t-vi commented Aug 12, 2025

Something is up here if we expect the second trainer to take no additional memory. Probably the best way to find out is to stare down the allocations using https://docs.pytorch.org/docs/stable/torch_cuda_memory.html

@Borda
Copy link
Member Author

Borda commented Aug 12, 2025

seems we hit pytorch/pytorch#150381 on Windows

@Borda Borda merged commit 4ff8ff7 into master Aug 13, 2025
135 checks passed
@Borda Borda deleted the bump/pt-2.8 branch August 13, 2025 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous Integration dependencies Pull requests that update a dependency file fabric lightning.fabric.Fabric pl Generic label for PyTorch Lightning package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants